﻿using Infinity.Statements.Declare;
using Infinity.Statements.Program;

namespace Infinity.Statements
{
	using System;
	using System.Collections.Generic;
	using System.Linq;
	using System.Text;

	public interface IScope
	{
		/// <summary>
		/// Declared variables of scope
		/// </summary>
		IDictionary<string, IVariableStatement> Variables { get; }

		/// <summary>
		/// Declared functions of scope
		/// </summary>
		IDictionary<string, IProgramStatement> Functions { get; }

		/// <summary>
		/// Current namespace
		/// </summary>
		string CurrentNamespace { get; set; }

		/// <summary>
		/// Statement of the scope
		/// </summary>
		IStatementBase ScopeStatement { get; set; }

		/// <summary>
		/// Available namespace collection in the statement
		/// </summary>
		List<string> NamespaceCollection { get; }

		/// <summary>
		/// It registers a new variable into scope.
		/// </summary>
		void RegisterVariable(IVariableStatement variable);

		/// <summary>
		/// It registers a new function into scope
		/// </summary>
		void RegisterFunction(IProgramStatement function);
	}
}